#!/bin/bash

# ----------------------------------------------------------------------
# Filename:   75559-rpm-qf.sh
# Version:    1.0
# Date:       2013/12/02
# Author:     yuanhui.shi
# Email:      yuanhui.shi@cs2c.com.cn
# Summary:    02系统基本功能-07开发环境-02开发工具-02rpm构建工具-03查询文件所属的软件包
# Notes:      rpm命令
# Copyright:  China Standard Software Co., Ltd.
# History：     
#             Version 1.0, 2013/12/02
#             -   The first one
# ----------------------------------------------------------------------

PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin
export PATH

source ../../lib/Echo.sh

source ../../lib/XmlParse.sh


function CleanData ()
{
  EchoInfo "75559-rpm-qf.sh执行完毕"
}

trap "CleanData" EXIT INT

#查询文件所属的软件包
EchoInfo "给出一个文件的全程路径，查询该文件所属的软件包"
rpm -qf /etc/inittab
EchoResult "查询文件所属的软件包"


